/**
 * Copyright &copy; 2020 <a href="https://github.com/somowhere/exam-system">exam-system</a> All rights reserved.
 */
package com.shanhesoft.java.modules.exam.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.shanhesoft.java.common.core.vo.PageModel;
import com.shanhesoft.java.common.persistence.service.impl.DataServiceImpl;
import com.shanhesoft.java.modules.exam.domain.BankVirtualTrainingQue;
import com.shanhesoft.java.modules.exam.domain.dto.BankVirtualTrainingQueDto;
import com.shanhesoft.java.modules.exam.domain.vo.BankVirtualTrainingQueVo;
import com.shanhesoft.java.modules.exam.repository.BankVirtualTrainingQueRepository;
import com.shanhesoft.java.modules.exam.service.BankVirtualTrainingQueService;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 实训题目管理ServiceImpl 实训题目管理
 * @author admin
 * @version 2020-11-17 01:00:59
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class BankVirtualTrainingQueServiceImpl extends DataServiceImpl<BankVirtualTrainingQueRepository, BankVirtualTrainingQue, BankVirtualTrainingQueDto, String> implements BankVirtualTrainingQueService{
	@Override
	public void saveOrUpdate(BankVirtualTrainingQueDto bankVirtualTrainingQueDto) {
		super.saveOrUpdate(bankVirtualTrainingQueDto);
	}

	@Override
	public IPage<BankVirtualTrainingQueVo> findPage(PageModel pm, QueryWrapper wrapper) {
		return repository.findTrainingQueVoPage(pm, wrapper);
	}

	@Override
	public IPage<BankVirtualTrainingQueVo> getListPage(PageModel pm, QueryWrapper wrapper) {
		return repository.findTrainingQueVoPageWithCount(pm, wrapper);
	}

	@Override
	public BankVirtualTrainingQueVo findVoById(String id) {
		return repository.findTrainingQueVoById(id);
	}

	@Override
	public IPage<BankVirtualTrainingQueVo> getListPageByUserId(PageModel pm, QueryWrapper wrapper) {
		return repository.findTrainingVoPageWithCountByUserId(pm, wrapper);
	}
}
